|
|
|
|
|
|
|
Q What is the difference between a control array and the control collection? |
|
|
|
|
|
|
|
|
A A control array is a standard array in which the elements are controls of the same type. The control collection is a system-created array that contains all of the controls on the form, no matter what type they are. |
|
|
|
|
|
|
|
|
Q What do objects of the same class share? |
|
|
|
|
|
|
|
|
A Objects of the same class share all of their properties, methods, and events. |
|
|
|
|
|
|
|
|
Q What is the benefit of creating your own collection? |
|
|
|
|
|
|
|
|
A Because a collection can contain any type of element, you can include any of the different objects that you are working with, including forms, controls, and variables. |
|
|
|
|
|
|
|
|
Q Why should I create my own class? |
|
|
|
|
|
|
|
|
A A custom class module enables you to bundle a function as a separate unit and use it as an object in any application by adding the saved class to the new project. |
|
|
|
|
|
|
|
|
The Workshop provides quiz questions to help solidify your understanding of the material covered, as well as exercises to provide you with experience in using what you've learned. Try to understand the quiz and exercise answers before continuing on to the next day's lesson. Answers are provided in Appendix A, Answers to Exercises. |
|
|
|
|
|
|
|
|
1. Name two different ways to programmatically check an object's class. |
|
|
|
|
|
|
|
|
2. Why is using the WithEnd With statements not recommended with the following code? |
|
|
|
 |
|
|
|
|
With txtInputFile
.Text = TextFile.TXT
.Maxlength = 10
End With |
|
|
|
|
|
|
|
|
3. Name the four objects that all collections share. |
|
|
|
|
|
|
|
|
4. How do you create a new instance of an object or class? |
|
|
|
|
|
|
|
|
Write an application that will put a new TextBox control on the form every time you click the command button. |
|
|
|
|
|